package com.learn.designPatterns.behavioral.Null;

/**
 * @classname:
 * @Description:
 * @author: yfpu
 * @Date: 2018-10-26 16:02
 */
public class Client {

    public static void main(String[] args) {
        AbstractOperation func = func(-1);
        func.request();
    }

    private static AbstractOperation func(int para) {

        if (para < 0)
            return new NullOperation();
        else
            return new RealOperation();

    }
}
